<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>面向对象</title>
</head>

<body>

</body>

</html>
<script>
    let Person = function(nickname, gender, age) {
        let obj = new Object();
        obj.nickname = nickname;
        obj.gender = gender;
        obj.age = age;
        return obj;
    };
    let person = new Person('刘晓兰', 0, 18);
    window.console.log(person);
    window.console.log('姓名:' + person.nickname);
</script>